package main

import "fmt"

type stu1 struct {
	id int
	name string
	score []int
}

type s1 struct {
	typename string
	data []interface{}
}

func main(){

	c:=[]s1{
		{"PROCESS_LIST",[]interface{}{1,2,3}},
		{"PROCESS_LIST",[]interface{}{2,3,4}},
		{"PROCESS_LIST",[]interface{}{3,4,5}},
	}
	fmt.Println(c)
	for _,v:=range c{
		fmt.Println(v.data)
	}


	arr:=[]stu1{
		{1,"zs",[]int{88,99,100}},
		{2,"ls",[]int{78,79,90}},
		{3,"yuanlj",[]int{100,100,100}},
	}

	fmt.Println(arr)

	for _,v:=range arr{
		sum:=0
		for _,data:=range v.score{
			sum+=data
			//fmt.Println(v.name,data)
		}
		avg:=sum/len(v.score)
		fmt.Println("name:",v.name,"score_snum:",sum,"avg:",avg)
	}


	a:=[]map[string][]int{}
	b:=map[string][]int{}
	b["PROCESS_LIST"]=[]int{1,2,3}
	//fmt.Printf("%T",a)
	a=append(a,b)
	a=append(a,b)
	a=append(a,b)

	a=append(a,)
	fmt.Println(a)

	for _,v:=range a{
		for i,data:=range v{
			fmt.Println(i,data)
		}
	}
}
